
import pymysql
if __name__ == '__main__':
    conn=pymysql.connect(host="localhost",port=3308,db="xuexiao",user="root",password="root1234")
    cursor=conn.cursor()
    name=input("姓名：")
    qq=input("qq：")
    we=input("wechat：")
    addr=input("address：")
    b=input("生日：")
    sex=input("性别：")

    sql='''
    insert into student(name,qq,telephone,addr,birthday,sex)
values(%s,%s,%s,%s,%s,%s)
    '''
    r=cursor.execute(sql,(name,qq,we,addr,b,sex))
    print("结果是：",r)
    conn.commit()
    conn.close()